Configuring Automatic ID Lookup

Activating Automatic ID Lookup

The lookup ID feature is disabled by default. You activate it with these methods:

Application Parameter

To use numeric ID fields, enable ID lookup by setting the activity parameter for the project: AbSystemAdministration-EnableIdLookup.

Activity ID

Parameter Name

Values

AbSystemAdministration

EnableIdLookup

0
1

If this parameter is not defined in the database, automatic ID lookup is disabled.

System administrators can change this parameter value and use the "Reload All Parameters" action in the System Administration / ARCHIBUS System Administration / ARCHIBUS Administrator - Application Configuration / Configure Application Parameters view to apply the change. There is no need to restart the application server. Users who are signed in will see the change after reloading their views. 

Manage Automatic Lookups view

System administrators can also use the System Administration / ARCHIBUS System Administration / Add-In Manager / Manage Automatic Lookups view to enable ID lookup:

ID lookup field metadata   

To automatically add lookup fields and tables to data sources and panels, designate the field in a table that contains lookup values for the ID field.

For each lookup field, you can specify these preferences:

How to display ID and/or lookup values

displayType=id|lookup|both|concatenate|translate

Value

Description

concatenate

Display concatenated ID and Lookup values    

id

Display only the ID field

lookup

Display only the lookup field. This is the default value.

both

Display the ID and Lookup fields

translate

Display the translated lookup field value in reports. Do not display read-only lookup value below the ID field in forms.
Use this option if the site does not use Numeric ID lookup for this FK field, but wishes to display translated field values. 

How to concatenate ID and lookup values when displayType=concatenate

// displays "02300 - Snow Removal Costs" - this is the default format
displayFormat= "{0} - {1}"
// displays "SMITH, JONAS (3421122)"
displayFormat.em_id= "{1} ({0})"

Placeholder {0} refers to the ID value, {1} refers to the Lookup value.

How to sort records in reports and grids when displayType=concatenate

orderBy=idFirst|lookupFirst

Value

Description

idFirst (or not specified)

Sort by ID values, then by Lookup values.

lookupFirst

Sort by Lookup values, then by ID values.

These preferences are stored in the afm_flds.attributes field for all lookup fields in most common lookup tables (bl, em, bu, dv, dp, rmcat, etc.). All XML attributes are optional. 

To mark another field as a lookup field, enter the code below in the afm_flds.attributes field:

<root>
<lookup/>
</root>

To mark a field as a lookup field, and specify optional lookup preferences:

<root>
<lookup displayType= "concatenate"  displayFormat= "{1} ({0})"  orderBy= "lookupFirst" />
</root>

The database defines lookup preferences for following fields:  

Tables

Field   

dp, dv, bu

name

property, bl, site, city, county, state, ctry, regn

name

rmtype, rmcat, rmstd, emstd, ac, projecttype

description

org  

org_name  

The V.23 database adds these new fields:

Table

Field

Heading

Size

em

name

Employee Name

96

cost_cat

description

Cost Category Description

96

cost_class

description

Cost Class Description

96

Upgrading the database

If a you changes lookup preferences in afm_flds.attributes, and then use the Database Change Wizard to upgrade the database, the Wizard will notify you about new and old value of the attribute. You will have two options:

Copyright © 1984-2019, ARCHIBUS, Inc. All rights reserved.